<%--
  Created by IntelliJ IDEA.
  User: 小灰灰
  Date: 2017/8/2
  Time: 16:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="com.zhuozhengsoft.pageoffice.FileSaver" pageEncoding="utf-8"%>
<%
    FileSaver fs=new FileSaver(request,response);
    fs.saveToFile(request.getSession().getServletContext().getRealPath("/upload/")+"/"+fs.getFileName());
    String filePath = request.getSession().getServletContext().getRealPath("/upload/")+"/"+fs.getFileName();
    System.out.print(filePath);// 查看filePath 的值
    fs.close();

%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

    <title>保存文件</title>

    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->

</head>

<body>
</body>
</html>